package com.java.exer_4;

/**
 * @author shkstart
 * @create 2021-01-14 11:01
 */
public class Test {
    public static void main(String[] args) {
        Poker poker = new Poker("方块", 7);
        Poker poker1 = poker;
        try {
            poker1 = (Poker) poker.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }

        System.out.println(poker);

        poker1.setType("梅花");

        System.out.println(poker);
        System.out.println(poker1);

        System.out.println(poker == poker1);//false
    }
}
